{% extends "base_generic.html" %}

{% block content %}
    <h1>所有借阅中的图书（图书馆员专用）</h1>

    {% if bookinstance_list %}
    <ul>
      {% for bookinst in bookinstance_list %}
      <li class="{% if bookinst.is_overdue %}text-danger{% endif %}">
        <a href="{% url 'book-detail' bookinst.book.pk %}">{{ bookinst.book.title }}</a>
        <p><strong>借阅者:</strong> {{ bookinst.borrower.get_full_name|default:bookinst.borrower.username }}</p>
        <p><strong>应归还日期:</strong> {{ bookinst.due_back }}</p>
        <p><strong>图书ID:</strong> {{ bookinst.id }}</p>
      </li>
      {% endfor %}
    </ul>
    {% else %}
      <p>当前没有借阅中的图书。</p>
    {% endif %}
{% endblock %}